﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="demo_page4Add.aspx.cs" Inherits="Demo.demo_page4Add" %>

<%@ Register Assembly="SqControls" Namespace="SqControls.SqVerification" TagPrefix="cc2" %>

<%@ Register Assembly="SqControls" Namespace="SqControls.SqJqueryManager" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="Styles/azure/style.css" rel="stylesheet" type="text/css" />
    <link href="Styles/css/core.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="Scripts/Public.js" type="text/javascript"></script>
    <script type="text/javascript">
        //验证地址，自定义函数验证，必须为中文
        function VaildAddress() {
            var tt = $("#txtAddress");
            if (tt.val() == "") return false;
            var reg = /[^\u4E00-\u9FA5]/;
            if (!reg.test(tt.val())) {
                return true;
            }
            return false;
        }
        function IsSave() {
            if (validateControls()) {
                parent.alertMsg.confirm("是否确认执行保存?", {
                    okCall: function () {
                        Public.CallBack("lbtn_Save", "");
                    }
                });
            } else {
                return false;
            }
        }
//        $(function () {
//            var $p = $(document);
//            $("div.button", $p).hoverClass("buttonHover");
//            $("div.buttonActive", $p).hoverClass("buttonActiveHover");
//        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager> 
    <cc1:JqueryManager ID="JqueryManager1" SelectedVersion="None" VerificationManager="true" SelectedControlScript="TextBox" SelectedControlCss="TextBox" runat="server"></cc1:JqueryManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <div id="dialog-add" class="win_demo">
		<fieldset>
            <label style="display:inline-table;width:60px;">用户名：</label>
            <asp:TextBox ID="txtUserName" runat="server" style="width:140px;" 
                        CssClass="textInput"></asp:TextBox>            
                        <cc2:ValidateRegExp ID="ValidateRegExp1" runat="server" SelectedRegExpType="UserNameReg" ForeColor="Red" ControlID="txtUserName" runat="server" ClearNull="True" IsFillInItem="True">*</cc2:ValidateRegExp>
        </fieldset>
        <fieldset>
            <label style="display:inline-table;width:60px;">地址：</label>
            <asp:TextBox ID="txtAddress" runat="server" style="width:140px;" 
                         CssClass="textInput"></asp:TextBox>
            <cc2:ValidateCusFunc ID="ValidateCusFunc1" ControlID="txtAddress" CusFuncName="VaildAddress" Text="*" ForeColor="Red" runat="server"></cc2:ValidateCusFunc>
        </fieldset>
        <fieldset>
            <label style="display:inline-table;width:60px;">身份证：</label>
            <asp:TextBox ID="txtIDCard" runat="server" style="width:140px;" 
                        CssClass="textInput"></asp:TextBox>
            <cc2:ValidateRegExp ID="ValidateRegExp2" ControlID="txtIDCard" IsFillInItem="true" SelectedRegExpType="ID_cardReg" ForeColor="Red" runat="server">*</cc2:ValidateRegExp>
        </fieldset>
        <fieldset>
            <label style="display:inline-table;width:60px;">电话：</label>
            <asp:TextBox ID="txtPhone" runat="server" style="width:140px;" 
                        CssClass="textInput"></asp:TextBox>
            <cc2:ValidateRegExp ID="ValidateRegExp3" ControlID="txtPhone" IsFillInItem="true" SelectedRegExpType="PhoneReg" ForeColor="Red" runat="server">*</cc2:ValidateRegExp>
        </fieldset>
        <fieldset>
            <label style="display:inline-table;width:60px;">手机：</label>
            <asp:TextBox ID="txtMobile" runat="server" style="width:140px;" 
                        CssClass="textInput"></asp:TextBox>
            <cc2:ValidateRegExp ID="ValidateRegExp4" ControlID="txtMobile" IsFillInItem="true" SelectedRegExpType="MobileReg" ForeColor="Red" runat="server">*</cc2:ValidateRegExp>
        </fieldset>
        <fieldset>
            <label style="display:inline-table;width:60px;text-align:right;">邮箱：</label>
            <asp:TextBox ID="txtEmail" runat="server" style="width:140px;" 
                        CssClass="textInput"></asp:TextBox>
            <cc2:ValidateRegExp ID="ValidateRegExp5" SelectedRegExpType="EmailReg" ControlID="txtEmail" IsFillInItem="true" ForeColor="Red" runat="server">*</cc2:ValidateRegExp>
        </fieldset>
        <fieldset>
            <label style="display:inline-table;width:60px;">邮政编码：</label>
            <asp:TextBox ID="txtPostalCode" runat="server" style="width:140px;" 
                        CssClass="textInput"></asp:TextBox>
            <cc2:ValidateRegExp ID="ValidateRegExp6" SelectedRegExpType="PostCodeReg" ControlID="txtPostalCode" IsFillInItem="true" ForeColor="Red" runat="server">*</cc2:ValidateRegExp>
        </fieldset>
        <fieldset style="text-align:center;">
           <table style="width:200px;text-align:center;margin:0 auto;padding:0 auto;" cellspacing=0 cellpadding=0 border=0 align="center">
              <tr>
                <td><a class="button" onclick="javascript:IsSave();return false;" href="javascript:void(0);"><span>保存</span></a></td>
                <td><a class="button" onclick="javascript:Public.CloseWindow();return false;" href="javascript:void(0);"><span>关闭</span></a></td>
              </tr>
           </table>      
        </fieldset>
        <div style="display:none;"><asp:LinkButton ID="lbtn_Save" runat="server" onclick="lbtn_Save_Click"></asp:LinkButton> </div>
	</div> 
    </ContentTemplate>
    </asp:UpdatePanel>

    </form>
</body>
</html>
